package com.mdoya.service;

import com.mdoya.domain.ShoppingCart;

import java.util.List;
import java.util.Map;

/**
 * @author mdoya
 * @version 1.0
 * @description:
 */
public interface ShoppingCartService {
    List<ShoppingCart> list();

    Integer add(ShoppingCart shoppingCart);

    /**
     *  根据用户id查找在购物车物品
     * @param userLongId
     * @return
     */
    List<ShoppingCart> findUserShoppinCar(Long userLongId);

    /**
     *   清空购物车
     * @param userLongId
     * @return
     */
    Integer cleanShoppingCar(Long userLongId);

    /**
     * 购物车数量处理
     * @param map
     * @return
     */
    Integer ShoppingCarCount(Map<String, String> map,Long userId);
}
